<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Role extends Model
{

    public function isAdmin()
    {
        return !!$this->is_admin;
    }

    public function users()
    {
        return $this->hasMany('App\User', 'id', 'role_id')->withTrashed();
    }
}